package cn.itsource.basic.mapper;

import cn.itsource.basic.query.BaseQuery;

import java.util.List;
/*公共的mapper接口*/
public interface BaseMapper<T> {
    List<T>  loadAll();

    T loadOne(Long id);

    void add(T t);

    void delete(Long id);

    void update(T t);

    /*通过分页条件查询总条数*/
    Integer loadTotal(BaseQuery baseQuery);

    /*查询当前页的数据*/
    List<T> loadData(BaseQuery baseQuery);

    /*批量删除*/
    void batchDelete(List<Long> ids);
}
